﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data;
using System.Data.SqlClient;
using K.DLInterface;
namespace K.DLBySelf
{
    public class SequenceDao : ISequence
    {

        public int SelectCurrVal(string seqName)
        {
            DbHelper.ExecuteNonQuery(CommandType.StoredProcedure, "GetDictionaryCurrVal");
            string sql = "select curr_val from nb_character where name=" + seqName;
            object o = DbHelper.ExecuteReader(CommandType.Text, sql, null);
            if (o == null)
            {
                throw new Exception();

            }
           return Convert.ToInt32(o); 
        }
    }
}
